<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.io.digest.Md2</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.io.digest.Md2");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461">tango.io.digest.Md2</a></h1>
                
<b>License:</b><br>
BSD style: see doc/license.txt for details<br><br>
<b>Version:</b><br>
Initial release: Feb 2006<br><br>
<b>author:</b><br>Regan Heath, Oskar Linde<br><br>        This module implements the MD2 Message Digest Algorithm as described 
        by RFC 1319 The MD2 Message-Digest Algorithm. B. Kaliski. April 1992.<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>class <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L26">Md2</a></span>
<script>explorer.outline.addDecl('Md2');</script> : MerkleDamgard;</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"></font><br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li><span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L37">this</a></span>
<script>explorer.outline.addDecl('this');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Construct an Md2</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L48">reset</a></span>
<script>explorer.outline.addDecl('reset');</script>(); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Initialize the cipher</font><br><br>
<b>Remarks:</b><br>Returns the cipher state to it's initial value<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L69">createDigest</a></span>
<script>explorer.outline.addDecl('createDigest');</script>(ubyte[] <span class="funcparam">buf</span>); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Obtain the digest</font><br><br>
<b>Returns:</b><br>
the digest<br><br>
<b>Remarks:</b><br>Returns a digest of the current cipher state, this may 
                be the final digest, or a digest of the state between 
                calls to update&#40;&#41;<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L80">digestSize</a></span>
<script>explorer.outline.addDecl('digestSize');</script>();</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">The MD 2 digest size is 16 bytes
 
</font><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L95">blockSize</a></span>
<script>explorer.outline.addDecl('blockSize');</script>(); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">block size</font><br><br>
<b>Returns:</b><br>
the block size<br><br>
<b>Remarks:</b><br>Specifies the size &#40;in bytes&#41; of the block of data to pass to
                each call to transform&#40;&#41;. For MD2 the blockSize is 16.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>uint <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L115">addSize</a></span>
<script>explorer.outline.addDecl('addSize');</script>(); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Length padding size</font><br><br>
<b>Returns:</b><br>
the length padding size<br><br>
<b>Remarks:</b><br>Specifies the size &#40;in bytes&#41; of the padding which uses the
                length of the data which has been ciphered, this padding is
                carried out by the padLength method. For MD2 the addSize is 
                0<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L134">padMessage</a></span>
<script>explorer.outline.addDecl('padMessage');</script>(ubyte[] <span class="funcparam">data</span>); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Pads the cipher data</font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">data</span></td><td>a slice of the cipher buffer to fill with padding</td></tr></table><br>
<b>Remarks:</b><br>Fills the passed buffer slice with the appropriate padding 
                for the final call to transform&#40;&#41;. This padding will fill 
                the cipher buffer up to blockSize&#40;&#41;-addSize&#40;&#41;.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L159">transform</a></span>
<script>explorer.outline.addDecl('transform');</script>(ubyte[] <span class="funcparam">input</span>); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Performs the cipher on a block of data</font><br><br>
<b>Params:</b><br>
<table>
<tr><td nowrap valign="top" style="padding-right: 8px"><span class="funcparam">data</span></td><td>the block of data to cipher</td></tr></table><br>
<b>Remarks:</b><br>The actual cipher algorithm is carried out by this method on
                the passed block of data. This method is called for every
                blockSize&#40;&#41; bytes of input data and once more with the 
                remaining data padded to blockSize&#40;&#41;.<br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L198">extend</a></span>
<script>explorer.outline.addDecl('extend');</script>(); [protected, override]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Final processing of cipher.</font><br><br>
<b>Remarks:</b><br>This method is called after the final transform just prior to
                the creation of the final digest. The MD2 algorithm requires
                an additional step at this stage. Future ciphers may or may not
                require this method.<br><br></dd></dl></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>ubyte[256] <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/io/digest/Md2.d?rev=3461#L209">PI</a></span>
<script>explorer.outline.addDecl('PI');</script>; [private, const]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black"></font><br><br></dd></dl></td></tr>
                <tr><td id="docfooter">
                        Copyright (c) 2006 Tango. All rights reserved :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:55 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>